import { useDetail, useList } from "@/hooks";
import { ref } from "vue";
import { getUserInfoUrl } from "@/command/apiTool";
import { getAction } from "@/command/netTool";
import * as vant from "vant";
const { showFailToast, showSuccessToast } = vant;
export const useRequest = () => {
  const page = ref();
  // 按钮操作
  const btnAction = (params: any) => {
    getAction(
      getUserInfoUrl({
        dh: "/api/H5/richHelpFormationApply/large/apply",
        xh: "/api/H5/richHelpFormationApply/small/apply",
      }).url,
      { ...params },
      { isResolve: true }
    ).then((e) => {
      showSuccessToast(e.msg);
      // 刷新接口
      page.value.reset();
    });
  };
  return {
    btnAction,
    page,
  };
};
